In [1]:
In [2]:
In [3]:
Out[3]:
survived pclass sex age sibsp parch fare embarked class who adult_male deck embark_town alive alone
0 0 3 male 22.0 1 0 7.2500 S Third man True NaN Southampton no False
1 1 1 female 38.0 1 0 71.2833 C First woman False C Cherbourg yes False
2 1 3 female 26.0 0 0 7.9250 S Third woman False NaN Southampton yes True
3 1 1 female 35.0 1 0 53.1000 S First woman False C Southampton yes False
4 0 3 male 35.0 0 0 8.0500 S Third man True NaN Southampton no True
In [6]:
In [5]:
Collecting plotly
  Downloading plotly-5.13.1-py2.py3-none-any.whl (15.2 MB)
     |████████████████████████████████| 15.2 MB 12.8 MB/s eta 0:00:01
Collecting tenacity>=6.2.0
  Downloading tenacity-8.2.2-py3-none-any.whl (24 kB)
Installing collected packages: tenacity, plotly
Successfully installed plotly-5.13.1 tenacity-8.2.2
Note: you may need to restart the kernel to use updated packages.
In [7]:

Q2. Using the tips dataset in the Plotly library, plot a box plot using Plotly express.

In [12]:
In [13]:
Out[13]:
total_bill tip sex smoker day time size
0 16.99 1.01 Female No Sun Dinner 2
1 10.34 1.66 Male No Sun Dinner 3
2 21.01 3.50 Male No Sun Dinner 3
3 23.68 3.31 Male No Sun Dinner 2
4 24.59 3.61 Female No Sun Dinner 4
... ... ... ... ... ... ... ...
239 29.03 5.92 Male No Sat Dinner 3
240 27.18 2.00 Female Yes Sat Dinner 2
241 22.67 2.00 Male Yes Sat Dinner 2
242 17.82 1.75 Male No Sat Dinner 2
243 18.78 3.00 Female No Thur Dinner 2

244 rows × 7 columns

In [21]:
In [26]:

Q3. Using the tips dataset in the Plotly library, Plot a histogram for x= "sex" and y="total_bill" column in the tips dataset. Also, use the "smoker" column with the pattern_shape parameter and the "day" column with the color parameter.

In [29]:
FemaleMale050010001500200025003000
day, smokerSun, NoSun, YesSat, NoSat, YesThur, NoThur, YesFri, NoFri, Yessexsum of total_bill

Q4. Using the iris dataset in the Plotly library, Plot a scatter matrix plot, using the "species" column for the color parameter. Note: Use "sepal_length", "sepal_width", "petal_length", "petal_width" columns only with the dimensions parameter.

In [31]:
4567823424645678012234246012
speciessetosaversicolorvirginicasepal_lengthsepal_widthpetal_lengthpetal_widthsepal_lengthsepal_widthpetal_lengthpetal_width

Q5. What is Distplot? Using Plotly express, plot a distplot.

The displot figure factory display a combination of statistical representing of numerical data,such as histogram,kernel density estimation or normal curve,and rug plot.

The displot can composed of all or any combination of the following 3 components:- a)histogram b)curve c)rug plot

In [37]:
In [ ]: